<template>
	<view>
		<view class="userList">
			<view class="userItem" v-for="(i,index) in userList" @tap="openItem(i)">
				<image src="../../static/gx.png" mode="aspectFill"></image>
				<view class="userInfo">
					<view>{{i.name}}</view>
					<text>{{i.id}}</text>
				</view>
			</view>
		</view>
	</view>
</template>
<script>
	export default {
		data() {
			return {
				userList:[
					{
						id:1,
						name:'程小时',
						url:'',
					},
					{
						id:2,
						name:'陆光',
						url:'',
					},
					{
						id:3,
						name:'乔玲',
						url:'',
					},
					{
						id:4,
						name:'阿肝',
						url:'',
					}
				]
			}
		},
		methods: {
			openItem(item){
				uni.navigateTo({
					url:`/pages/calls/calls?id=${item.id}&name=${item.name}`
				})
			}
			
		}
	}
</script>

<style lang="scss" scoped>
	.userList{
		display: flex;
		flex-direction: column;
		.userItem{
			padding: 30rpx;
			display: flex;
			border-bottom: 1px solid #eee;
			image{
				width: 120rpx;
				height: 120rpx;
				margin-right: 30rpx;
			}
			.userInfo{
				display: flex;
			}
			&:active{
				background-color: #f2f2f2;
			}
		}
		
	}

</style>
